package com.stylefeng.guns.modular.item.service.impl;

import com.stylefeng.guns.modular.item.model.Item;
import com.stylefeng.guns.modular.item.dao.ItemMapper;
import com.stylefeng.guns.modular.item.service.IItemService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yyi
 * @since 2018-09-26
 */
@Service
public class ItemServiceImpl extends ServiceImpl<ItemMapper, Item> implements IItemService {

    @Override
    public List<Item> getItemByCategoryOrderByDate(int category) {
        return this.baseMapper.getItemByCategoryOrderByDate(category);
    }

    @Override
    public Item getNextItem(int category, Date date) {
        return this.baseMapper.getNextItem(category,date);
    }

    @Override
    public Item getPreviousItem(int category, Date date) {
        return this.baseMapper.getPrevoiusItem(category, date);
    }
}
